/**
 * 找图点击测试
 */
auto()
if (!requestScreenCapture(false)) {
    console.error('---无截图权限')
}
setScreenMetrics(1600, 900)
var template = images.read('/storage/emulated/0/脚本/launcher/resources/images/task/2.png')
var windowImg = captureScreen()
console.log(template, windowImg)
var point = images.findImage(windowImg, template, {
    region: [0, 0],
    threshold: 0.8
})
if(point) {
    console.error('---找到图片: ' + [point.x, point.y])
    click(point.x, point.y)
} else {
    console.error('---没找到')
}
